#ifndef __THREAD_MSG_H
#define __THREAD_MSG_H

typedef enum {
    MQ_ID_STAR = 0x70,
    MSG_ID_MQ_DEV_INFO,
    MSG_ID_MQ_APP_RACK,
    
    MSG_ID_MQ_APP_WACK,
    MSG_ID_MQ_APP_WRITE,
    MSG_ID_MQ_OTA_DOWNLOAD
} mq_msg_id_t;

typedef struct {
    long type;
    char* topic;
    char* payload;
    int topic_len;
    int payload_len;
} msg_t;

int thread_msg_init(char* path);
int thread_msg_recv(msg_t* msg, int type);
int thread_msg_send(msg_t* msg);

#endif
